package com.ych.prototype;

/**
 * Created by 灰灰 on 2017/6/30.
 */
public class Main {
    public static void main(String[] args) {
        Prototype prototype = new ConcretePrototype("prototype");
        Prototype prototype1 =new TestPrototype("test");
        Prototype child = (Prototype)prototype.clone();
        Prototype child1 = (Prototype) prototype1.clone();
        System.out.println(prototype.getName());
        System.out.println(child.getName());
        System.out.println(prototype1.getName());
        System.out.println(child1.getName());
        System.out.println(prototype);
        System.out.println(child);
        System.out.println(prototype1);
        System.out.println(child1);
    }
}
